package com.shxt.model;

import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import com.shxt.pojo.D_File_Root_Struct;
import com.shxt.pojo.D_User_Upload;
import com.shxt.service.D_File_Root_StructService;
import com.shxt.service.D_User_UploadService;

public class FolderReader {
	public void findFolder(long userid,long folderid){
		Map<String,String> mss = new HashMap<String,String>();
		mss.put("File_Owner",userid+"");
		mss.put("Folder_Father_Id",folderid+"");
		List<D_File_Root_Struct> ldfrs = D_File_Root_StructService.getInstance().selectFolder(mss);
		Iterator<D_File_Root_Struct> idfrs = ldfrs.iterator();
		while(idfrs.hasNext()){
			D_File_Root_Struct dfrs = idfrs.next();
			System.out.println(dfrs.getFolder_Name());
		}
	}
	public void folderFile(long folderID){
		List<D_User_Upload> lduu = D_User_UploadService.getInstance().folderFileData(folderID);
		Iterator<D_User_Upload> iduu = lduu.iterator();
		while(iduu.hasNext()){
			D_User_Upload duu = iduu.next();
			System.out.println(duu.getData_FileName());
		}
		
	}
	public static void main(String[] args){
		FolderReader fr = new FolderReader();
		fr.findFolder(123, 506);
	}
}
